package com.lepu.app.fun.chat.business.chatcore;


import org.jivesoftware.smack.packet.PacketExtension;

/**
 * 在线咨询
 */
public class QuestionPacketExtension implements PacketExtension {

    public static final String ELEMENT_NAME = "fromType";
    public static final String NAME_SPACE = "jabber:client";
    private String questionID; //瓶子id
    private String NodeType = "ConsultQuestion";
    private String questioncContent;//内容

    public QuestionPacketExtension(String questionID, String questioncContent) {
        this.questionID = questionID;
        this.questioncContent = questioncContent;
    }

    public QuestionPacketExtension() {
    }

    @Override
    public CharSequence toXML() {
        return "<fromType >" +
                "<ConsultType>" + NodeType + "</ConsultType>" +
                "<id>" + questionID + "</id>" +
                "<content>" + questioncContent + "</content>" +
                "</fromType>";
    }

    @Override
    public String getNamespace() {
        return NAME_SPACE;
    }

    @Override
    public String getElementName() {
        return ELEMENT_NAME;
    }

    public String getQuestionID() {
        return questionID;
    }

    public void setQuestionID(String questionID) {
        this.questionID = questionID;
    }

    public String getNodeType() {
        return NodeType;
    }

    public void setNodeType(String nodeType) {
        NodeType = nodeType;
    }

    public String getQuestioncContent() {
        return questioncContent;
    }

    public void setQuestioncContent(String questioncContent) {
        this.questioncContent = questioncContent;
    }
}
